package com.niiwoo.civet.mobile.vo.response.creditor;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Setter
@Getter
@ToString
@ApiModel("债转列表筛选条件")
public class CreditorSaleSelectorResponseVO {

    @ApiModelProperty("调用来源（1:APP，2:H5）")
    private Byte fromType;

    @ApiModelProperty("利率配置")
    private List<RateConfig> rateConfigs = new ArrayList<>();

    @ApiModelProperty("期限配置")
    private List<PeriodConfig> periodConfigs = new ArrayList<>();

    @ApiModelProperty("默认排序配置")
    private List<SortConfig> sortConfigs = new ArrayList<>();

    @ApiModelProperty("优惠方式配置")
    private List<FavorableTypeConfig> favorableTypeConfigs = new ArrayList<>();

    @ApiModelProperty("收益方式配置")
    private List<RepayMentTypeConfig> repayMentTypeConfig = new ArrayList<>();

    @ApiModelProperty("产品类型配置")
    private List<ProductConfig> productConfigs = new ArrayList<>();

    @Setter
    @Getter
    @ToString
    @ApiModel("利率配置")
    public class RateConfig {
        @ApiModelProperty("利率-标题")
        private String rateTitle;

        @ApiModelProperty("利率-起")
        private BigDecimal rateBegin;

        @ApiModelProperty("利率-起查询类型：1大于，2大于等于，3等于")
        private Byte rateBeginQueryType;

        @ApiModelProperty("利率-止")
        private BigDecimal rateEnd;

        @ApiModelProperty("利率-止查询类型：1小于，2小于等于，3等于")
        private Byte rateEndQueryType;

        @ApiModelProperty("利率-排序值")
        private Integer rateSortValue;
    }

    @Setter
    @Getter
    @ToString
    @ApiModel("期限配置")
    public class PeriodConfig {
        @ApiModelProperty("期限-标题")
        private String periodTitle;

        @ApiModelProperty("期限-起")
        private Integer periodBegin;

        @ApiModelProperty("期限-起查询类型：1大于，2大于等于，3等于")
        private Byte periodBeginQueryType;

        @ApiModelProperty("期限-止")
        private Integer periodEnd;

        @ApiModelProperty("期限-止查询类型：1小于，2小于等于，3等于")
        private Byte periodEndQueryType;

        @ApiModelProperty("期限单位：1月，2天")
        private Byte unit;

        @ApiModelProperty("期限-排序值")
        private Integer periodSortValue;
    }

    @Setter
    @Getter
    @ToString
    @ApiModel("默认排序配置")
    public class SortConfig {
        @ApiModelProperty("默认排序-标题")
        private String sortTitle;

        @ApiModelProperty("默认排序-排序值")
        private Byte sortValue;
    }

    @Setter
    @Getter
    @ToString
    @ApiModel("优惠方式配置")
    public class FavorableTypeConfig{

        @ApiModelProperty("优惠方式-标题")
        private String favorableTypeTitle;

        @ApiModelProperty("优惠方式：1全价转让，2降价转让")
        private Byte favorableTypeValue;

        @ApiModelProperty("优惠方式-排序值")
        private Integer favorableTypeSortValue;

    }

    @Setter
    @Getter
    @ToString
    @ApiModel("收益方式配置")
    public class RepayMentTypeConfig{

        @ApiModelProperty("收益方式标题")
        private String repaymentTypeTitle;

        @ApiModelProperty("收益方式：2等额本息，3先息后本")
        private Byte repaymentTypeValue;

        @ApiModelProperty("收益方式-排序值")
        private Integer repaymentTypeSortValue;

    }

    @Setter
    @Getter
    @ToString
    @ApiModel("产品类型配置")
    public class ProductConfig{

        @ApiModelProperty("产品类型标题")
        private String borrowerTypeTitle;

        @ApiModelProperty("产品类型：1:个人、2:企业")
        private Byte borrowerTypeValue;

        @ApiModelProperty("产品类型-排序值")
        private Integer borrowerTypeSortValue;

    }
}
